<template>
	<view class="lineitem">
		<view class="lineitem_box">
			<view class="lineitem_box_dibu"></view>
			<view class="lineitem_box_shang">
				<view class="box">
					<view class="mallorders_shang_zhong" v-for="item in lists" :key="item.id">
						<view class="mallorders_shang_zhong_a">
							<image :src="item.productInfo.image" class="img"></image>
						</view>
						<view class="mallorders_shang_zhong_b">
							<text class="text1">{{item.productInfo.storeName}}</text>
							<view class="mallorders_shang_zhong_b_text">
								<text class="text2">{{item.productInfo.storeInfo}}</text>
								<text class="text3">x{{item.cartNum}}</text>
							</view>
							<view class="mallorders_shang_zhong_c">
								<text class="text4">￥
									<text class="text5">{{item.truePrice}}</text>
									
								</text>
							</view>
						</view>
					</view>
					<view class="commoditydetails_box_bottom_a">
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">运费：</text>
							<text class="text2"  >￥{{lineitemobj.totalPostage}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">优惠券：</text>
							<text class="text2"  >￥{{lineitemobj.couponPrice}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">订单编号：</text>
							<text class="text2"  >{{lineitemobj.orderId}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">收货人：</text>
							<text class="text2"  >{{lineitemobj.realName}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">支付方式：</text>
							<text class="text2"  >{{lineitemobj.payTypeName}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">下单时间：</text>
							<text class="text2"  >{{lineitemobj.createTime}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">付款时间：</text>
							<text class="text2"  >{{lineitemobj.payTime}}</text>
						</view>
						<!-- <view class="commoditydetails_box_bottom_a_a">
							<text class="text1">发货时间：</text>
							<text class="text2"  >{{lineitemobj.payTime}}</text>
						</view> -->
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">物流编号：</text>
							<text class="text2"  >{{lineitemobj.deliveryId}}</text>
						</view>
						<view class="commoditydetails_box_bottom_a_a">
							<text class="text1">收货地址：</text>
							<text class="text2">{{lineitemobj.userAddress}}</text>
						</view>
					</view>
					<view class="box_bottom">
						<text class="text1">实付：</text>
						<text class="text2">￥{{lineitemobj.payPrice}}</text>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import homeServices from '../../service/homeService'
	export default{
		data(){
			return{
				orderId:'',
				list:[
					
				],
				lists:[],
				lineitemobj:{}
			}
		},
		methods:{
			async getlineitem(){
				let params = {
					orderId:this.orderId
				}
				let res = await homeServices.getlineitem(params)
				this.lists=res.data.cartInfo
				this.lineitemobj=res.data
				console.log(this.lists)
			}
		},
		onShow() {
			this.getlineitem()
		},
		onLoad(id){
			
			this.orderId=id.orderId
			console.log(this.orderId)
			// this.list.forEach(item=>{
			// 	if(item.id==2){
					
			// 	}
			// })
		}
	}
</script>

<style lang="scss" scoped>
	@import '@/static/sass/lineitem.scss'
</style>